﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using MP.Core.Library;

public partial class Member_Tools_Control_LogsByDate : MP.Core.Authentication.Control.AuthenBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string date = "";
            if (FDateTime.IsDate(Request["fr"]))
            {
                date = Request["fr"];
            }
            else
            {
                date = DateTime.Now.ToString("dd/MM/yyyy");
            }

            txtFrDate.Text = date;

            if (FDateTime.IsDate(Request["to"]))
            {
                date = Request["to"];
            }
            else
            {
                date = DateTime.Now.ToString("dd/MM/yyyy");
            }

            txtToDate.Text = date;
        }
    }

    protected void btnSearch_Click(object sender, EventArgs e)
    {
        RedirectPage("fr=" + Server.UrlEncode(txtFrDate.Text), "to=" + Server.UrlEncode(txtToDate.Text));
    }
}
